import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import Element from 'element-ui'
import Cookies from 'js-cookie'
import router from './router'
import store from './store'
import api from './http'
import JsonViewer from 'vue-json-viewer'
import '@/assets/iconfont/iconfont.css'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(JsonViewer)
import * as filters from './filters' // 全局过滤器
// 注册全局实用程序过滤器。
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
// import './mock'
import './utils/util'

Vue.use(Element, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
})
Vue.use(api)
Vue.prototype.$cookies = Cookies;

Vue.config.productionTip = false

Vue.prototype.$axios=axios  //将请求模块挂载在vue原型上 


// 引入echarts
import echarts from 'echarts'
// 将echarts注册到Vue组件的原型对象中去
Vue.prototype.$echarts = echarts

new Vue({
  router: router,axios,
  store,
  render: h => h(App),
}).$mount('#app')
